package cn.stylefeng.guns.sys.modular.plotHouseInfo.mapper;

import cn.stylefeng.guns.sys.modular.plotHouseInfo.entity.HouseInfo;
import cn.stylefeng.guns.sys.modular.plotHouseInfo.model.TreeBean;
import cn.stylefeng.guns.sys.modular.plotHouseInfo.model.params.HouseInfoParam;
import cn.stylefeng.guns.sys.modular.plotHouseInfo.model.result.HouseInfoResult;
import cn.stylefeng.guns.sys.modular.plotInfo.model.params.XqInfoParam;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 房产表 Mapper 接口
 * </p>
 *
 * @author WangZhen
 * @since 2021-01-21
 */
public interface HouseInfoMapper extends BaseMapper<HouseInfo> {

    /**
     * 获取列表
     *
     * @author WangZhen
     * @Date 2021-01-21
     */
    List<HouseInfoResult> customList(@Param("paramCondition") HouseInfoParam paramCondition);

    /**
     * 获取map列表
     *
     * @author WangZhen
     * @Date 2021-01-21
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") HouseInfoParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author WangZhen
     * @Date 2021-01-21
     */
    Page<HouseInfoResult> customPageList(@Param("page") Page page, @Param("paramCondition") HouseInfoParam paramCondition);

    /**
     * 获取列表
     *
     * @author WangZhen
     * @Date 2021-01-21
     */
    List<HouseInfoResult> customListSingle(@Param("paramCondition") HouseInfoParam paramCondition);


    /**
     * 插入数据
     */

    void insertPlotHouse(@Param("paramCondition") HouseInfoParam paramCondition);


    /**
     * 插入房屋与人员关系表数据
     *
     * @param paramCondition
     */
    void insertPersonAndPlotRelation(@Param("paramCondition") HouseInfoParam paramCondition);


    /**
     * 删除接口
     *
     * @param paramCondition
     * @return
     */
    Integer selectDelete(@Param("paramCondition") Integer paramCondition);


    /**
     * 逻辑删除
     *
     * @param paramCondition
     */
    void updateDelete(@Param("paramCondition") Integer paramCondition);


    /**
     * 修改
     *
     * @param paramCondition
     */
    void updatePlotHouse(@Param("paramCondition") HouseInfoParam paramCondition);

    /**
     * 修改关联表
     *
     * @param paramCondition
     */
    void updatePersonAndPlot(@Param("paramCondition") HouseInfoParam paramCondition);


    /**
     * 通过小区id查询楼号
     *
     * @param paramCondition
     * @return
     */
    List<String> selectBuildNo(@Param("paramCondition") HouseInfoParam paramCondition);


    /**
     * 通过小区id、楼号查询单元
     *
     * @param paramCondition
     * @return
     */
    List<String> selectUnitNo(@Param("paramCondition") HouseInfoParam paramCondition);


    /**
     * 通过小区id、楼号、单元查询楼层
     *
     * @param paramCondition
     * @return
     */
    List<String> selectLevelNo(@Param("paramCondition") HouseInfoParam paramCondition);


    /**
     * 通过小区id、楼号、单元、楼层查询门号
     *
     * @param paramCondition
     * @return
     */
    List<HouseInfoResult> selectDoorNo(@Param("paramCondition") HouseInfoParam paramCondition);


    /**
     * 查询树
     *
     * @param paramCondition
     * @return
     */
    List<Map<String,String>> queryTree(@Param("paramCondition") TreeBean paramCondition);


}
